<?php
/**
 * 策略执行者
 * User: 16
 * Date: 2018/9/18
 * Time: 11:30
 */
namespace strategy;

class Substance{
    private $strategy;

    public function __construct(StrategyInterface $strategy){
        $this->strategy = $strategy;
    }

    /**
     * 执行策略
     * @desc
     * @author 16
     * @date 2018/9/18
     */
    public function operation(){
        $this->strategy->dosomething();
    }
}